﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ex03.GarageLogic
{
    public class InternalCombustionCar : Car
    {
        private const float k_InternalCombustionCarMaximumFuelCapacityInLitres = 45F;
        private const EnergyType.eEnergyType k_InternalCombustionCarFuelType = EnergyType.eEnergyType.Octan95;
        private const int k_InternalCombustionCarWheelAmount = 4;
        private const float k_InternalCombustionCarWheelMaximumAirPressure = 29F;

        private InternalCombustionPropulsion m_InternalCombustionCarPropulsionType;

        public InternalCombustionCar(
            string i_InternalCombustionCarModelName,
            string i_InternalCombustionCarLicenseNumber,
            eCarColor i_InternalCombustionCarColor,
            eDoorsAmount i_InternalCombustionCarDoorsAmount)
            : base(
            i_InternalCombustionCarModelName,
            i_InternalCombustionCarLicenseNumber, 
            k_InternalCombustionCarWheelAmount,
            k_InternalCombustionCarWheelMaximumAirPressure,
            i_InternalCombustionCarColor,
            i_InternalCombustionCarDoorsAmount)
        {
            m_InternalCombustionCarPropulsionType = new InternalCombustionPropulsion(k_InternalCombustionCarFuelType, k_InternalCombustionCarMaximumFuelCapacityInLitres);
        }

        public override bool AddPropulsionMaterial(
            EnergyType.eEnergyType i_PropulsionMaterialType,
            float i_PropulsionMaterialAmountToAdd)
        {
            return m_InternalCombustionCarPropulsionType.AddPropulsionMaterial(i_PropulsionMaterialType, 
                i_PropulsionMaterialAmountToAdd);
        }
    }
}
